package com.tianqi.modules.pms.controller;

import com.tianqi.common.api.CommonResult;
import com.tianqi.modules.pms.dto.request.ArrangeDiskReqDTO;
import com.tianqi.modules.pms.dto.request.DaLiuRenReqDTO;
import com.tianqi.modules.pms.dto.response.DaLiuRenRespDTO;
import com.tianqi.modules.pms.dto.response.EightCharAllRespDTO;
import com.tianqi.modules.pms.service.DaLiuRenService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @className: DaLiuRenController
 * @description: 大六壬控制类
 * @author: zp
 * @create: 2023-08-18 09:44
 **/
@RestController
@RequestMapping("/pms/daLiuRen")
@Slf4j
public class DaLiuRenController {

    @Autowired
    private DaLiuRenService daLiuRenService;

    @ApiOperation(value = "获取大六壬数据")
    @RequestMapping(value = "/getDaLiuRen", method = RequestMethod.POST)
    public CommonResult<DaLiuRenRespDTO> getDaLiuRen(@RequestBody @Validated DaLiuRenReqDTO daLiuRenReqDTO) {

        return daLiuRenService.getEightCharacters(daLiuRenReqDTO);
    }
}
